home *** CD-ROM | disk | FTP | other *** search
-
- /*
- ┌────────────────────────────────────────────────────────────────────────────┐
- │jzstrcat.c │
- │Concatenate multiple strings together in one function call using a variable │
- │number of parameters. │
- │Simply put a null string (0) as the last argument in the function. │
- │Synopsis: │
- │ char *wdir,wstr[255]; │
- │ │
- │ *wdir = "MSC"; │
- │ *wstr=0; │
- │ │
- │ jzstrcat(wstr,"\\",wdir,"\\","JAZ",0); │
- │ │
- │ (wstr now equals "\MSC\JAZ") │
- └────────────────────────────────────────────────────────────────────────────┘
- */
-
- jzstrcat(fstr,fparm)
- char *fstr;
- char *fparm;
- {
-
- int w;
-
- /**
- ** We are going to loop through the addresses of the parmameters.
- ** Effectively looking at our arguments on the stack
- **/
-
- for (w = 0 ; *(*(&fparm + w)) ; w ++) /* until we hit a null string */
- strcat(fstr,*(&fparm + w)); /* reference the address of the parms */
-
- }